package com.eight.cloud.payment.common.constant;

import java.text.MessageFormat;

/**
 * @ClassName: CacheConstant
 * @Author: TXC
 * @Date: 2024-12-13 11:03
 **/
public class CacheConstant {
    public final static String PAY_NOTIFY_URL_CACHE_KEY = "client:notify:url:cache:{0}:{1}";
    public final static String PAYMENT_MERCHANT_AUTH_APP_CACHE_KEY = "payment:merchant:auth:app:{0}:{1}";
    /**
     * 将给定的占位符键模板与实际参数结合，生成完整的Redis键。
     *
     * @param template   键模板，包含占位符{}
     * @param keys 实际参数值，按顺序替换模板中的{}
     * @return 完整的Redis键
     */
    public static String generateKey(String template, Object... keys) {
        return MessageFormat.format(template, keys);
    }
}
